gtkprintoperation-win32: Don't track grab-notify
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 24 Jun 2020 13:37:11 +0000 (15:37 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 24 Jun 2020 18:35:23 +0000 (20:35 +0200)
Further grabs could presumably only come from events handled within
the dialog itself. It seems overeager to do this.

gtk/gtkprintoperation-win32.c

index 2b9ec44b751bc61c30d4ae5993c7b6e9dba02055..ad430760d45dd891ee608b95e8c6ec2246a64bb3 100644 (file)
@@ -1395,15 +1395,6 @@ print_callback_new  (void)
   return &callback->iPrintDialogCallback;
 }
 
-static  void
-plug_grab_notify (GtkWidget        *widget,
-                 gboolean          was_grabbed,
-                 GtkPrintOperation *op)
-{
-  EnableWindow (GetAncestor (GDK_SURFACE_HWND (gtk_native_get_surface (gtk_widget_get_native (widget))), GA_ROOT),
-               was_grabbed);
-}
-
 static INT_PTR CALLBACK
 pageDlgProc (HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
 {
@@ -1429,9 +1420,6 @@ pageDlgProc (HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
 
       /* This dialog is modal, so we grab the embed widget */
       gtk_grab_add (plug);
-
-      /* When we lose the grab we need to disable the print dialog */
-      g_signal_connect (plug, "grab-notify", G_CALLBACK (plug_grab_notify), op);
       return FALSE;
     }
   else if (message == WM_DESTROY)